package com.fr.base.core.serializable;

import java.awt.geom.Point2D;
import java.awt.geom.Point2D.Double;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;

public class Point2DSerializable
  implements Serializable
{
  private transient Point2D point2D;

  public Point2DSerializable(Point2D paramPoint2D)
  {
    this.point2D = paramPoint2D;
  }

  public Point2D getPoint2D()
  {
    return this.point2D;
  }

  private void readObject(ObjectInputStream paramObjectInputStream)
    throws ClassNotFoundException, IOException
  {
    paramObjectInputStream.defaultReadObject();
    this.point2D = new Point2D.Double(paramObjectInputStream.readDouble(), paramObjectInputStream.readDouble());
  }

  private void writeObject(ObjectOutputStream paramObjectOutputStream)
    throws IOException
  {
    paramObjectOutputStream.defaultWriteObject();
    paramObjectOutputStream.writeDouble(this.point2D.getX());
    paramObjectOutputStream.writeDouble(this.point2D.getY());
  }
}